import 'package:flutter/material.dart';
import 'package:mall/constant/app_colors.dart';
import 'package:mall/constant/text_style.dart';

class ItemTextView extends StatelessWidget {
  final leftText;
  final rightText;
  final VoidCallback? callback;

  ItemTextView(this.leftText, this.rightText, {this.callback});

  @override
  Widget build(BuildContext context) {
    return InkWell(
      onTap: () {
        callback?.call();
      },
      child: Container(
        padding: EdgeInsets.only(left: 15, right: 15),
        height: 45,
        decoration: BoxDecoration(
          color: AppColors.C_FFFFFF,
          borderRadius: BorderRadius.all(Radius.circular(10)),
        ),
        child: Row(
          children: <Widget>[
            Text(
              leftText,
              style: FMTextStyle.color_222222_size_13,
            ),
            Expanded(
                child: Container(
              alignment: Alignment.centerRight,
              child: Text(
                rightText,
                style: FMTextStyle.color_999999_size_13,
              ),
            ))
          ],
        ),
      ),
    );
  }
}
